using Services;

public class PauseUI_Manager : MyCanvasGrounp
{
    private void Start()
    {
        ServiceLocator.Get<EventSystem>().AddListener<EGameState, EGameState>(EEvent.GameStateChange, OnGameStateChange);
    }

    private void OnGameStateChange(EGameState from, EGameState to)
    {
        switch (to)
        {
            case EGameState.OpenPauseMenu:
                Visible = true;
                break;
            default:
                Visible = false;
                break;
        }
    }
}
